import xml2js from 'xml2js'

export const parseXML = (xml) => {
  return new Promise((resolve, reject) => {
    xml2js.parseString(xml, { trim: true }, (error, content) => {
      if (error) { return error }
      else { resolve(content) }
    })
  })
}
